package cn.ds.assets.module.assets.controller.admin.metadataDatasource.vo;

import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.ds.assets.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.time.LocalDate;

import static cn.ds.assets.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 元数据管理-数据源分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BaseMetadataDatasourcePageReqVO extends PageParam {

    @Schema(description = "主键ID")
    private Long[] ids;

    @Schema(description = "数据源名称", example = "张三")
    private String name;

    @Schema(description = "数据源地址,符合JDBC规范", example = "https://www.iocoder.cn")
    private String url;

    @Schema(description = "数据源账号", example = "芋艿")
    private String username;

    @Schema(description = "数据源密码")
    private String password;

    @Schema(description = "数据源描述")
    private String desc;

    @Schema(description = "所属数据层,1:原始数据层ODS,2:数据仓库层DW,3:数据集市层DM")
    private Byte dataLayer;

    @Schema(description = "状态,0:未知,1:正常,-1:异常", example = "2")
    private Boolean status;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "项目空间ID,关联assets_project的id字段", example = "19301")
    private Long projectId;

    @Schema(description = "数据源类型,1:MySQL, 2:Oracle, 3:Hive, 4:PostgreSQL, 5:SQL Server", example = "1")
    private Byte type;

}
